Plot method for objects of class "PerFit".
# S3 method for PerFit
plot(x, cutoff.obj=NULL,
ModelFit="NonParametric", Nreps=1000,
IP=x$IP, IRT.PModel=x$IRT.PModel, Ability=x$Ability,
Ability.PModel=x$Ability.PModel, mu=0, sigma=1,
Blvl = 0.05, Breps = 1000, CIlvl = 0.95,
UDlvl = NA,
Type="Density", Both.scale=TRUE, Cutoff=TRUE, Cutoff.int=TRUE,
Flagged.ticks = TRUE,
Xlabel=NA, Xcex=1.5, title=NA, Tcex=1.5,
col.area="lightpink", col.hist="lightblue", col.int="darkgreen",
col.ticks="red", ...)
Object of class "PerFit".
Object of class "PerFit.cutoff".
Method required to compute model-fitting item score patterns. The options available are "NonParametric"
(default) and "Parametric"
.
Number of model-fitting item score patterns generated. Default is 1000.
Matrix with previously estimated item parameters. Default is x$IP
.
Parametric IRT model (required if "ModelFit=Parametric"
or if the person fit statistic is parametric). Default is x$IRT.PModel
.
Matrix with previously estimated item parameters. Default is x$Ability
.
Method to use in order to estimate the latent ability parameters (required if "ModelFit=Parametric"
or if the person fit statistic is parametric). Default is x$Ability.PModel
.
Mean of the apriori distribution. Only used when method="BM"
. Default is 0.
Standard deviation of the apriori distribution. Only used when method="BM"
. Default is 1.
Significance level for bootstrap distribution (value between 0 and 1). Default is 0.05.
Number of bootstrap resamples. Default is 1000.
Level of bootstrap percentile confidence interval for the cutoff statistic.
User-defined cutoff level.
Type of plot: "Histogram"
, "Density"
(default), "Both"
.
Logical: Should the y-axis be adjusted so that both the histogram and the density graphics are completely visible? Default is TRUE
.
Logical: Should the estimated cutoff be added to the plot? Default is TRUE
.
Logical: Should an approximated (1-Blvl)% bootstrap confidence interval be added to the plot? Default is TRUE
.
Logical: Should ticks representing the flagged respondents be added to the plot? Default is TRUE
.
Label of x-axis, otherwise a default label is shown.
Font size of the label of x-axis.
Title of the plot, otherwise a default title is shown.
Font size of the title of the plot.
Color of "flagging region".
Color of histogram.
Color of bootstrap confidence interval.
Color of the ticks marking the flagged respondents.
Extra graphical parameters to be passed to plot
.
This function plots the empirical distribution of the scores of the person-fit statistic specified by the "PerFit" class object x
. A histogram, density, or a combination of both displays is possible.
The cutoff score may be provided by means of the cutoff.obj
object, otherwise it is internally computed (for which the function parameters ModelFit
through CIlvl
are required; see cutoff
for more details). The value of the cutoff is superimposed to the plot when Cutoff=TRUE
. In this case, the adequate "flagging region" is colored, thus indicating the range of values for which the person-fit statistic flags respondents as potentially displaying aberrant behavior. The option Both.scale
was introduced to help to better tune the scale of the y-axis. Furthermore, the percentile confidence interval for the cutoff value (with confidence level defined by the cutoff.obj
) is displayed in the x-axis, and ticks marking the flagged respondents are display on the top of the plot.
# NOT RUN {
# Load the inadequacy scale data (dichotomous item scores):
data(InadequacyData)
# Compute the ZU3 scores:
ZU3.out <- ZU3(InadequacyData)
# Plot the sampling distribution of the ZU3 scores, with cutoff value based on a nominal 5% level,
# and 90% confidence interval:
plot(ZU3.out, Type="Both", Blvl=.05, CIlvl = 0.90)
# }
Run the code above in your browser using DataLab